package demo;

public class W4_NumberRunnable implements Runnable {
	private final W4_SynchMethod printer;

    public W4_NumberRunnable(W4_SynchMethod printer) {
        this.printer = printer;
    }

    @Override
    public void run() {
        for (int i = 1; i <= 52; i += 2) {
            printer.printNumber(i);
            printer.printNumber(i + 1);
        }
    }
}
